package com.shop.dao;

import java.util.Set;

import com.shop.entity.Goods;
import com.shop.entity.Member;
import com.shop.entity.Merchant;
import com.shop.entity.MerchantAddress;
import com.shop.entity.MerchantInfor;
import com.shop.entity.MerchantOrder;

public interface MerchantDao extends BaseDao<Merchant> {
	public Merchant findByUsername (String username) ;
	
	/*
	 * 获取关联的商品
	 */
	public Set<Goods> findGoodss(Merchant m) ;
	/*
	 * 获取关联的发货地址
	 */
	public Set<MerchantAddress> findAddress(Merchant m) ;
	/*
	 * 获取关联的店铺信息
	 */
	public MerchantInfor findInfor(Merchant m) ;
	/*
	 * 获取关联的店铺订单
	 */
	public Set<MerchantOrder> findOrders(Merchant m) ;
	/*
	 * 插入关联的商品
	 */
	public boolean saveGoods(Integer id, Goods goods) ;
	/*
	 * 插入关联的发货地址
	 */
	public boolean saveAddress(Integer id, MerchantAddress add) ;
	/*
	 * 插入关联的店铺信息
	 */
	public boolean saveInfor(Integer id, MerchantInfor infor) ;
	/*
	 * 插入关联的店铺订单
	 */
	public boolean saveOrders(Integer id, MerchantOrder order) ;
}
